package com.neuedu.yyzx.controller;

import com.neuedu.yyzx.po.Dept;
import com.neuedu.yyzx.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
//允许跨域
@CrossOrigin
@RequestMapping("/dept")
public class DeptController {
	@Autowired
	private DeptService deptService;
	@RequestMapping("/queryAll")
	public List<Dept> queryAll(){
		return deptService.queryAll();
	}
}
